package com.lantosec.hmrp.modules.supplier.vo;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.modules.supplier.entity.SupplierEntry;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 供应商准入信息 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierEntry对象", description="供应商准入信息")
public class SupplierEntryVO extends BaseVO<SupplierEntry> {
    private static final long serialVersionUID = 1L;


    public SupplierEntryVO(SupplierEntry entity){
        this.entryId = entity.getEntryId();
        this.supplierCode = entity.getSupplierCode();
        this.supplierType = entity.getSupplierType();
        this.validityEndDate = entity.getValidityEndDate();
        this.entryState = entity.getEntryState();
        this.applyTime = entity.getApplyTime();
        this.applyUserId = entity.getApplyUserId();
        this.applyUser = entity.getApplyUser();
        this.entryTime = entity.getEntryTime();
        this.stopFlag = entity.getStopFlag();
    }

    @Override
    public SupplierEntry convertToEntity(){
        return new SupplierEntry(this);
    }


    @ApiModelProperty(value = "供应商准入ID")
    private String entryId;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "准入供应商类型，字典表ID")
    private String supplierType;

    @ApiModelProperty(value = "有效期结束日期（yyyy-MM-dd）")
    private String validityEndDate;

    @ApiModelProperty(value = "准入状态(0正常1未审核2审核中3过期4停用)")
    private Integer entryState;

    @ApiModelProperty(value = "申请时间")
    private Date applyTime;

    @ApiModelProperty(value = "申请人ID")
    private String applyUserId;

    @ApiModelProperty(value = "申请人")
    private String applyUser;

    @ApiModelProperty(value = "准入时间")
    private Date entryTime;

    @ApiModelProperty(value = "是否暂停采购(0否1是)")
    private Boolean stopFlag;


}
